
<%@ page import="com.auctionhaus.Bid" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'bid.label', default: 'Bid')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                            <g:sortableColumn property="id" title="${message(code: 'bid.id.label', default: 'Id')}" />
                            <g:sortableColumn property="amount" title="${message(code: 'bid.amount.label', default: 'Bid Amount')}" />
                            <g:sortableColumn property="date" title="${message(code: 'bid.date.label', default: 'Bid Date Time')}" />
                            <g:sortableColumn property="buyer.emailAddress" title="${message(code: 'bid.buyer.emailAddress.label', default: 'Buyer')}" />
                            <g:sortableColumn property="listing.listName" title="${message(code: 'bid.listing.listName.label', default: 'Listing')}" />
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${bidInstanceList}" status="i" var="bidInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td><g:link action="show" id="${bidInstance.id}">${fieldValue(bean: bidInstance, field: "id")}</g:link></td>
                            <td><g:link action="show" id="${bidInstance.id}">${fieldValue(bean: bidInstance, field: "amount")}</g:link></td>
                            <td><g:link action="show" id="${bidInstance.id}">${fieldValue(bean: bidInstance, field: "date")}</g:link></td>
                            <td><g:link action="show" id="${bidInstance.id}">${fieldValue(bean: bidInstance, field: "buyer.emailAddress")}</g:link></td>
                            <td><g:link action="show" id="${bidInstance.id}">${fieldValue(bean: bidInstance, field: "listing.listName")}</g:link></td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${bidInstanceTotal}" />
            </div>
         </div>
    </body>
</html>
